import config from '@/config';
import http from '@/utils/request';

export default {
	page: {
		url: `${config.API_URL}/prodtranssn/pages/`,
		name: '分页',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	pageLike: {
		url: `${config.API_URL}/prodtranssn/pageslike/`,
		name: '分页模糊查询',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	list: {
		url: `${config.API_URL}/prodtranssn/list/`,
		name: '列表',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	model: {
		url: `${config.API_URL}/prodtranssn/`,
		name: '查询一条',
		get: async function (params) {
			return await http.get(this.url + params);
		},
	},
	concession: {
		url: `${config.API_URL}/prodtranssn/concession/`,
		name: '让步接收',
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	mandatoryNg: {
		url: `${config.API_URL}/prodtranssn/mandatoryng/`,
		name: '强制 NG',
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	scrap: {
		url: `${config.API_URL}/prodtranssn/scrap/`,
		name: '报废',
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
};
